package com.adan.content.controller;

import com.adan.content.model.dto.CourseCategoryTreeDto;
import com.adan.content.service.CourseCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 课程分类 前端控制器
 * </p>
 *
 * @author adan
 */
@Slf4j
@RestController
@Api(value = "课程分类信息接口", tags = "课程分类信息接口")
@RequestMapping("course-category")
public class CourseCategoryController {

    @Autowired
    private CourseCategoryService  courseCategoryService;

    @ApiOperation("查询课程分类信息")
    @GetMapping("/tree-nodes")
    public List<CourseCategoryTreeDto> queryTreeNodes(){
        return courseCategoryService.queryTreeNodes();

    }

}
